'use strict';


//引入模块
let Koa=require("koa");
let bodyPaeser=require("koa-bodyparser");
let contrller=require('./contrllers');
let statics=require('koa-static');
let temp=require('./templating');
let sessions=require('./session');
let app=new Koa();
app.use(sessions(app));
app.use(statics(__dirname+'/static'))
app.use(bodyPaeser());
app.use(temp)
app.use(contrller());


let port=2350;
app.listen(port,()=>{
    console.log(`http://127.0.0.1:${port}`);
})